package org.flexlancer.container
{
	import components.Node;
	
	import mx.core.Container;
	
	import org.flexlancer.Logger.Logger;
	import org.flexlancer.enums.AppVariables;

	public class NodesContainer extends Container
	{
		public function NodesContainer()
		{
			super();
		}
		
		public function AddNode(parmLabel:String,parmImageSource:String, parmData:XML):Node{
			try{
				var newNode:Node = new Node();
				newNode.Title = parmLabel;
				newNode.Source = AppVariables.URL_GET_THUMBNAIL + "?id=" +parmImageSource;
				newNode.data = parmData;
				this.addChild(newNode);
				return newNode;
			}catch(err:Error){
				Logger.LogE(err);
			}
			return null;
		}
	}
}